Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky test, testIndexingMultiPolygon #483

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

heemin32
Copy link
Collaborator

@heemin32 heemin32 commented Sep 26, 2023

Description

Temporary fix of #294

    // TODO: Implement randomXYPolygon to return only valid polygon and remove this method
    @SneakyThrows
    private static Polygon validRandomXYPolygon(boolean hasAlt) {
        Polygon polygon = randomXYPolygon(hasAlt);
        try {
            XYPolygon xyPolygon = XYShapeConverter.toXYPolygon(polygon);
            // Test validity of polygon
            Tessellator.tessellate(xyPolygon, true);
            return polygon;
        } catch (Exception e) {
            return (Polygon) RandomPicks.randomFrom(Randomness.get(), List.of(getPolygonWithHoles(), getPolygonWithoutHoles()));
        }
    }

Issues Resolved

#294

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

Merging #483 (40a2f14) into main (8d2a327) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main     #483   +/-   ##
=========================================
  Coverage     88.59%   88.59%           
  Complexity      753      753           
=========================================
  Files            92       92           
  Lines          2717     2717           
  Branches        221      221           
=========================================
  Hits           2407     2407           
  Misses          230      230           
  Partials         80       80           

see 2 files with indirect coverage changes

@heemin32
Copy link
Collaborator Author

This is a temporary fixed as of now. For a proper fix, we need a fix in lucene library.
apache/lucene#12287 and apache/lucene#12596

Once they are fixed in lucene, we can remove ShapeTestUtils class

@heemin32 heemin32 changed the title Fix flaky test, testIndexingMultiPolygon #294 Fix flaky test, testIndexingMultiPolygon Sep 26, 2023
Copy link
Member

@vamshin vamshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks

@heemin32 heemin32 merged commit 702c5b6 into opensearch-project:main Sep 26, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants